package com.jt.controller;

import org.apache.catalina.webresources.ClasspathURLStreamHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//将该类交给Spring管理
@PropertySource(value = "classpath:/demo.properties",encoding = "utf-8")
public class HelloController {

    @Value("${msg.hello}")
    private String  msg;
    @Value("${pro.msg}")
    private String pro;

    @RequestMapping("hello")
    public String  hello(){
        return msg+"||"+pro;
    }
}
